package cz.cuni.mff.abacs.burglar;

import cz.cuni.mff.abacs.burglar.visual.VisualBurglar;


/**
 * The main class of the package.
 * 
 * Runs either the level generator or the game application depending on the parameters.
 * 
 * The object shouldn't be instantiated. 
 */
public class App {
		
	
	// -------------------------------------------------------------------------
	// constructors:
	
	
	/** The object shouldn't be instantiated. */
	private App() {}
	
	
	// -------------------------------------------------------------------------
	
	
	/** 
	 * The implicit inputs and outputs are standard input/output.
	 * 
	 * "-g": it's a level generator run
	 * 
	 * level generator arguments:
	 * "-m %s": input map name
	 * "-l %s": output level name
	 * "-t %d": required number of traprooms
	 * 
	 * gameplay arguments:
	 * "-w %d": width
	 * "-h %d": height
	 * "-r": show frame rate
	 * "-f": full screen mode
	 */
	public static void main( String[] args ) {
		
		boolean isLevelGenerator = false;
		
		for(int index = 0; index < args.length; index++){
			
			// is level generator:
			if(args[index].equals("-generator")){
				isLevelGenerator = true;
			}
			
		}
		
		if(isLevelGenerator) {
			LevelGenerator.main(args);
		}else{
			VisualBurglar.main(args);
		}
		
	}
	
}

